<template>
  <detailDialog :dialogConfig="dialogConfig" @close="close" :off="off" title="入库单详情">
  </detailDialog>
</template>

<script>
export default {
  name: "detail",
  watch: {
    off(val){
      if(val){
        this.dialogConfig.formConfig.formData = this.rowData;
      }
    }
  },
  data(){
    return {
      dialogConfig: {
        tableConfig: {
            isHaveTable: false,
        },
        formConfig: {
            formData: {},
            fieldConfig: [
                {label: "入库时间", value: "createDate",bottomBorder: true, bottomStyle: "bottomStyle"},
                {label: "供应商编号", value: "createDate", },
                {label: "供应商名称", value: "providerName"},
                {label: "商品编号", value: "goodsId"},
                {label: "商品名称", value: "goodsName"},
                {label: "进货价格", value: "price"},
                {label: "进货总价", value: "allPrice", bottomBorder: true, bottomStyle: "bottomStyle"},
                {label: "仓库名称", value: "storehouseName"},
            ]
        }
      },
    }
  },
  props: {
    off: {
      type: Boolean
    },
    rowData: {
        type: Object
    }
  },
  components: {
    detailDialog: () => import("@/components/detailDialog")
  },
  methods: {
      close(data){
          this.$emit("update:off", false);
      }
  }
};
</script>

<style></style>